![]() |
GetPixel |
||||
Header: | Quickdraw.h | Carbon status: | Supported | |
Determines whether the pixel associated with a point is black or white.
Boolean GetPixel ( SInt16 h, SInt16 v );
The horizontal coordinate of the point for the pixel to be tested.
The vertical coordinate of the point for the pixel to be tested.
TRUE if the pixel is black or FALSE if it is white
The selected pixel is immediately below and to the right of the point whose coordinates you supply in the h and v parameters, in the local coordinates of the current graphics port. There’s no guarantee that the specified pixel actually belongs to the current graphics port, however; it may have been drawn in a graphics port overlapping the current one. To see if the point indeed belongs to the current graphics port, you could use the PtInRgn function to test whether the point is in the current graphics port’s visible region, as shown here.
PtInRgn(pt, thePort^.visRgn);
Supported in Carbon. Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.
© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)